#pragma once

// Dependencies
#include "../Core/Rect2.h"
#include "../Core/Point2.h"
#include "../Core/Color4.h"

namespace Gui {
	class Widget {
	public:
		Widget( const Core::Rect2f& area );
		virtual ~Widget();

	public:
		virtual bool onMouseDown( const Core::Point2f& pt ) = 0;	// Returns true when click is handled
		virtual bool onMouseUp( const Core::Point2f& pt ) = 0;
		virtual void render() = 0;

	public:
		bool test( const Core::Point2f& pt ) const;

	public:
		Core::Rect2f mClientArea;
		Core::Color4 mColor;
	};
}